import request from "@/api/https.js"
export const addressApi = {
	addressList: (params = {}) => {
		return request.request({
			url: "/member/addresslist",
			method: "GET",
			data: params
		})
	},
	addAddress: (params = {}) => {
		return request.request({
			url: "/member/address",
			method: "post",
			data: params
		})
	},
	addressDetail: (params = {}) => {
		console.log(params)
		return request.request({
			url: `/member/address/${params.id}`,
			method: "get",
			data: null
		})
	},
	delAddress: (params = {}) => {
		return request.request({
			url: `/member/address/${params.id}`,
			method: "delete",
			data: null
		})
	},
	editAddress: (params = {}) => {
		return request.request({
			url: `/member/address/${params.address_id}`,
			method: "PUT",
			data: params.info
		})
	},
}
